package com.ithema;

import java.util.ArrayList;

public class Test2 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("柳岩");
        list.add("杨幂");
        list.add("迪丽热巴");
        list.add("马尔扎哈");

        list.remove(3);//推荐用索引删除
        list.set(2,"热巴");

        System.out.println(list);
        System.out.println(list.size());
    }
}
